home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 6 / coreaids.zip / ALOC_CHG.ASM next >
Assembly Source File  |  1987-06-25  |  902b  |  37 lines

  1. ;    DESC:    Modifies Allocated memory block size                 V1.00
  2. ;    IN:    *{BLOCK} segment address of memory block to be modified
  3. ;        *{PARA} new requested block size in paragraphs {ie multiples
  4. ;         of 16 bytes}
  5. ;    SAMPLE:    Callm    ALOC_CHG,<BLOCK,PARA>,
  6. ;    #############################################################
  7.  
  8.     Extrn    PUSHALL:Near            ;save registers.
  9.     Extrn    POPALL:Near
  10.     Extrn    ERRORMSG:Near            ;display error messages.
  11.  
  12. ALOC_CHC    Segment
  13.     Assume    CS:ALOC_CHC
  14.     Public    ALOC_CHG
  15.                         ;notice.
  16.     DB    'ALOC_CHG - V1.00, Copyright 1987, CoreTechs   ',0DH,0AH
  17.  
  18. ALOC_CHG    Proc    Near
  19.     Call    PUSHALL
  20.  
  21.     Pop    BX                ;requested block size in para.
  22.     Pop    ES                ;segment of memory block.
  23.  
  24.     Mov    AH,4AH                ;set memory block.
  25.     Int    21H
  26.     Jc    ERROR                ;if there is error report it.
  27.  
  28.     Call    POPALL
  29.     Ret
  30.  
  31. ERROR:    Push    AX                ;report error, and abort.
  32.     Call    ERRORMSG
  33.  
  34. ALOC_CHG    Endp
  35. ALOC_CHC    Ends
  36.     End
  37.